selectVinculo<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@taglib uri="http://java.sun.com/jsf/extensions/dynafaces" prefix="d" %>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Criar novo tipo de usuário</title>
            <link rel="stylesheet" type="text/css" href="/globalimage2/faces/jsfcrud.css" /><%@ include file="/WEB-INF/jspf/AjaxScripts.jspf" %><script type="text/javascript" src="/globalimage2/faces/jsfcrud.js"></script>
        </head>
        <body>
            <%@include file="../../WEB-INF/jspf/header/head.jspf"%>
            <div style="float:left">
                <%@include file="../../WEB-INF/jspf/header/menuDinamico.jspf"%>
            </div>
            <div id="div_content">

                <h3>Criar novo tipo de usuário</h3>
                <h:form>

                    <h:commandLink action="#{tipoUsuario.create}" value="Salvar"/> &nbsp;|&nbsp;
                    <h:commandLink action="#{tipoUsuario.listSetup}" value="Exibir todos" immediate="true"/>

                    <h:panelGroup id="messagePanel" layout="block">
                        <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                    </h:panelGroup>

                    <h:inputHidden id="validateCreateField" validator="#{tipoUsuario.validateCreate}" value="value"/>
                    <h:panelGrid columns="2">
                        <h:outputText value="Nome:"/>
                        <h:inputText id="nome" value="#{tipoUsuario.tipoUsuario.nome}" title="Nome" maxlength="254" size="45" required="true" requiredMessage="O campo nome é obrigatório." />

                        <h:outputText value="Vinculo:"/>
                        <h:selectOneMenu required="true" value="#{tipoUsuario.tipoUsuario.vinculoId}">
                            <f:selectItems value="#{vinculo.vinculoItemsAvailableSelectOne}"/>
                        </h:selectOneMenu>
                        
                        <h:outputText value="Permissões:"/>
                        <h:selectManyListbox id="permissaoCollection" style="height:400px;width:300px" value="#{tipoUsuario.tipoUsuario.jsfcrud_transform[jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method.collectionToArray][jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method.arrayToList].permissaoCollection}" title="Permissão" size="10" converter="#{permissao.converter}" >
                            <f:selectItems value="#{permissao.permissaoItemsAvailableSelectMany}"/>
                        </h:selectManyListbox>
                    </h:panelGrid>

                </h:form>
            </div>
        </body>
    </html>
</f:view>
